/**
 * Generate time : 2011-05-19 13:30:17
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.ce.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCEA6 table comment : 设备故障记录
 */
public class ZMCEA6 extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdEquipmentId = " "; /* 设备卡片ID */
	private String fdProductionUnitsId = " "; /* 生产单元ID */
	private String fdFaultreFlag = " "; /* 故障来源 */
	private String fdCode = " "; /* 故障记录编号 */
	private String fdBeginClock = " "; /* 开始时刻 */
	private String fdEndClock = " "; /* 结束时刻 */
	private String fdDescription = " "; /* 故障描述 */
	private String fdPracticalProblem = " "; /* 实际故障 */
	private String fdFaultreason = " "; /* 故障原因 */
	private String fdTreatmentMeasure = " "; /* 处理措施 */
	private String fdStatus = " "; /* 处理状态 */
	private String fdProcessDepartmen = " "; /* 处理部门 */
	private String fdProcessPerson = " "; /* 处理人 */

	private String fdFaultCount = " "; /* 故障发生次数 */
	private String fdFaultLatest = " "; /* 最近故障发生时刻 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("设备卡片ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdProductionUnitsId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("生产单元ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdFaultreFlag");
		eiColumn.setFieldLength(1);
		eiColumn.setDescName("故障来源");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdCode");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("故障记录编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdBeginClock");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("开始时刻");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEndClock");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("结束时刻");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDescription");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("故障描述");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPracticalProblem");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("实际故障");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdFaultreason");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("故障原因");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdTreatmentMeasure");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("处理措施");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdStatus");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("处理状态");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdProcessDepartmen");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("处理部门");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdProcessPerson");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("处理人");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdFaultCount");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("故障发生次数");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdFaultLatest");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("最近故障发生时刻");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCEA6() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdEquipmentId - 设备卡片ID
	 * 
	 * @return the fdEquipmentId
	 */
	public String getFdEquipmentId() {
		return this.fdEquipmentId;
	}

	/**
	 * set the fdEquipmentId - 设备卡片ID
	 */
	public void setFdEquipmentId(String fdEquipmentId) {
		this.fdEquipmentId = fdEquipmentId;
	}

	/**
	 * get the fdProductionUnitsId - 生产单元ID
	 * 
	 * @return the fdProductionUnitsId
	 */
	public String getFdProductionUnitsId() {
		return this.fdProductionUnitsId;
	}

	/**
	 * set the fdProductionUnitsId - 生产单元ID
	 */
	public void setFdProductionUnitsId(String fdProductionUnitsId) {
		this.fdProductionUnitsId = fdProductionUnitsId;
	}

	/**
	 * get the fdFaultreFlag - 故障来源
	 * 
	 * @return the fdFaultreFlag
	 */
	public String getFdFaultreFlag() {
		return this.fdFaultreFlag;
	}

	/**
	 * set the fdFaultreFlag - 故障来源
	 */
	public void setFdFaultreFlag(String fdFaultreFlag) {
		this.fdFaultreFlag = fdFaultreFlag;
	}

	/**
	 * get the fdCode - 故障记录编号
	 * 
	 * @return the fdCode
	 */
	public String getFdCode() {
		return this.fdCode;
	}

	/**
	 * set the fdCode - 故障记录编号
	 */
	public void setFdCode(String fdCode) {
		this.fdCode = fdCode;
	}

	/**
	 * get the fdBeginClock - 开始时刻
	 * 
	 * @return the fdBeginClock
	 */
	public String getFdBeginClock() {
		return this.fdBeginClock;
	}

	/**
	 * set the fdBeginClock - 开始时刻
	 */
	public void setFdBeginClock(String fdBeginClock) {
		this.fdBeginClock = fdBeginClock;
	}

	/**
	 * get the fdEndClock - 结束时刻
	 * 
	 * @return the fdEndClock
	 */
	public String getFdEndClock() {
		return this.fdEndClock;
	}

	/**
	 * set the fdEndClock - 结束时刻
	 */
	public void setFdEndClock(String fdEndClock) {
		this.fdEndClock = fdEndClock;
	}

	/**
	 * get the fdDescription - 故障描述
	 * 
	 * @return the fdDescription
	 */
	public String getFdDescription() {
		return this.fdDescription;
	}

	/**
	 * set the fdDescription - 故障描述
	 */
	public void setFdDescription(String fdDescription) {
		this.fdDescription = fdDescription;
	}

	/**
	 * get the fdPracticalProblem - 实际故障
	 * 
	 * @return the fdPracticalProblem
	 */
	public String getFdPracticalProblem() {
		return this.fdPracticalProblem;
	}

	/**
	 * set the fdPracticalProblem - 实际故障
	 */
	public void setFdPracticalProblem(String fdPracticalProblem) {
		this.fdPracticalProblem = fdPracticalProblem;
	}

	/**
	 * get the fdFaultreason - 故障原因
	 * 
	 * @return the fdFaultreason
	 */
	public String getFdFaultreason() {
		return this.fdFaultreason;
	}

	/**
	 * set the fdFaultreason - 故障原因
	 */
	public void setFdFaultreason(String fdFaultreason) {
		this.fdFaultreason = fdFaultreason;
	}

	/**
	 * get the fdTreatmentMeasure - 处理措施
	 * 
	 * @return the fdTreatmentMeasure
	 */
	public String getFdTreatmentMeasure() {
		return this.fdTreatmentMeasure;
	}

	/**
	 * set the fdTreatmentMeasure - 处理措施
	 */
	public void setFdTreatmentMeasure(String fdTreatmentMeasure) {
		this.fdTreatmentMeasure = fdTreatmentMeasure;
	}

	/**
	 * get the fdStatus - 处理状态
	 * 
	 * @return the fdStatus
	 */
	public String getFdStatus() {
		return this.fdStatus;
	}

	/**
	 * set the fdStatus - 处理状态
	 */
	public void setFdStatus(String fdStatus) {
		this.fdStatus = fdStatus;
	}

	/**
	 * get the fdProcessDepartmen - 处理部门
	 * 
	 * @return the fdProcessDepartmen
	 */
	public String getFdProcessDepartmen() {
		return this.fdProcessDepartmen;
	}

	/**
	 * set the fdProcessDepartmen - 处理部门
	 */
	public void setFdProcessDepartmen(String fdProcessDepartmen) {
		this.fdProcessDepartmen = fdProcessDepartmen;
	}

	/**
	 * get the fdProcessPerson - 处理人
	 * 
	 * @return the fdProcessPerson
	 */
	public String getFdProcessPerson() {
		return this.fdProcessPerson;
	}

	/**
	 * set the fdProcessPerson - 处理人
	 */
	public void setFdProcessPerson(String fdProcessPerson) {
		this.fdProcessPerson = fdProcessPerson;
	}

	/**
	 * get the fdFaultCount - 故障发生次数
	 * 
	 * @return the fdFaultCount
	 */
	public String getFdFaultCount() {
		return this.fdFaultCount;
	}

	/**
	 * set the fdFaultCount - 故障发生次数
	 */
	public void setFdFaultCount(String fdFaultCount) {
		this.fdFaultCount = fdFaultCount;
	}

	/**
	 * get the fdFaultLatest - 最近故障发生时刻
	 * 
	 * @return the fdFaultLatest
	 */
	public String getFdFaultLatest() {
		return this.fdFaultLatest;
	}

	/**
	 * set the fdFaultLatest - 最近故障发生时刻
	 */
	public void setFdFaultLatest(String fdFaultLatest) {
		this.fdFaultLatest = fdFaultLatest;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdEquipmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentId")), fdEquipmentId));
		setFdProductionUnitsId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProductionUnitsId")), fdProductionUnitsId));
		setFdFaultreFlag(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdFaultreFlag")), fdFaultreFlag));
		setFdCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCode")), fdCode));
		setFdBeginClock(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdBeginClock")), fdBeginClock));
		setFdEndClock(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEndClock")), fdEndClock));
		setFdDescription(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDescription")), fdDescription));
		setFdPracticalProblem(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdPracticalProblem")), fdPracticalProblem));
		setFdFaultreason(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdFaultreason")), fdFaultreason));
		setFdTreatmentMeasure(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdTreatmentMeasure")), fdTreatmentMeasure));
		setFdStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStatus")), fdStatus));
		setFdProcessDepartmen(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProcessDepartmen")), fdProcessDepartmen));
		setFdProcessPerson(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProcessPerson")), fdProcessPerson));

		setFdFaultCount(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdFaultCount")), fdFaultCount));
		setFdFaultLatest(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdFaultLatest")), fdFaultLatest));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdEquipmentId", StringUtils.toString(fdEquipmentId, eiMetadata.getMeta("fdEquipmentId")));
		map.put("fdProductionUnitsId", StringUtils.toString(fdProductionUnitsId, eiMetadata.getMeta("fdProductionUnitsId")));
		map.put("fdFaultreFlag", StringUtils.toString(fdFaultreFlag, eiMetadata.getMeta("fdFaultreFlag")));
		map.put("fdCode", StringUtils.toString(fdCode, eiMetadata.getMeta("fdCode")));
		map.put("fdBeginClock", StringUtils.toString(fdBeginClock, eiMetadata.getMeta("fdBeginClock")));
		map.put("fdEndClock", StringUtils.toString(fdEndClock, eiMetadata.getMeta("fdEndClock")));
		map.put("fdDescription", StringUtils.toString(fdDescription, eiMetadata.getMeta("fdDescription")));
		map.put("fdPracticalProblem", StringUtils.toString(fdPracticalProblem, eiMetadata.getMeta("fdPracticalProblem")));
		map.put("fdFaultreason", StringUtils.toString(fdFaultreason, eiMetadata.getMeta("fdFaultreason")));
		map.put("fdTreatmentMeasure", StringUtils.toString(fdTreatmentMeasure, eiMetadata.getMeta("fdTreatmentMeasure")));
		map.put("fdStatus", StringUtils.toString(fdStatus, eiMetadata.getMeta("fdStatus")));
		map.put("fdProcessDepartmen", StringUtils.toString(fdProcessDepartmen, eiMetadata.getMeta("fdProcessDepartmen")));
		map.put("fdProcessPerson", StringUtils.toString(fdProcessPerson, eiMetadata.getMeta("fdProcessPerson")));

		map.put("fdFaultCount", StringUtils.toString(fdFaultCount, eiMetadata.getMeta("fdFaultCount")));
		map.put("fdFaultLatest", StringUtils.toString(fdFaultLatest, eiMetadata.getMeta("fdFaultLatest")));

		return map;

	}
}